1. Field of the Invention
This invention relates to signing and sealing objects.
2. Background Art
An object-oriented runtime environment includes objects that contain both behavior and state. An object's state at runtime evolves in the runtime environment. Because a runtime object evolves, it is considered to be “live.” It may become necessary to distribute a runtime object across systemic boundaries. In a secure environment, it may be desired to first authenticate a distributed runtime object before it is used. A mechanism is needed for authenticating “live” objects. Further, a mechanism is needed to secure, or seal, a runtime object.
Authentication is a process used in secure systems for verifying static information. For example, authentication is used to verify the origin of the authenticated information. If the information is identified as being from a trusted source, the information is considered valid.
Authentication is typically performed by creating a signature that is attached to the information. A recipient uses the signature to verify the information. Typically, the originator of the information uses a private key (a key known only to the originator of the information and signature) to generate a digital signature that is attached to the information. The recipient of the information uses the attached signature and a public key (a key generated using the private key that is distributed to the public) to verify the signature thereby verifying the information.
There are many algorithms for signing information. The National Institute of Standards and Technology (NIST) has proposed the Digital Signature Standard (DSS) that uses the Digital Signature Algorithm (DSA). According to DSS and DSA, a signature is comprised of two parts, r and s, that are generated using a set of transformations that operate on a private key, a random number, the hash of the message, and three publicly-known parameters. The components of the signature, r and s, are sent to a recipient. To verify or authenticate the signature, the recipient generates a value for r using a public key (generated from the private key). The set of transformations performed by the recipient operate using s, the public key, the hash of the message, and the publicly-known parameters. If the value of r that is generated using the public key is the same as the value of r that is generated with the private key, the signature is verified.
The variables that are used in DSA are as follows:
p: 512–1024—bit prime number
q: 160—bit prime factor of p−1
h: a value less than p−1 and where h(p−1)/q mod p>1
g: h(p−1)/q mod p
y: gx mod p
x: <q
The variable, x, is the private key and y is the public key. As can be seen from the variable definitions, the private key, x, is used to generate the public key, y. To generate a signature, a random number, k, is determined that is less than q. The signature is comprised of both r and s which are generated as follows:r=(gkmodp)modq s=(k−1(H(m)+xr))modq 
In calculating s, the information for which the signature is being created is input to a hash (e.g., using a one-way hash) function to generate H(m). Thus, the information is used to generate the signature. The signature is sent along with the information, or message, to the recipient. The recipient verifies the signature by computing a value for r, v. If v is the same as r, then the signature is verified. The recipient calculates v as follows:w=s−1modq u1=(H(m)*w)modq u2=(rw)modq v=((gu1*yu2)modp)modq 
The recipient uses the public key, y, to verify the signature. If the calculated signature, v, is the same as the signature, r, the signature is verified and the information is thereby verified. Thus, the information is authenticated by authenticating a signature attached to the information.
Another aspect of security is ensuring that the information itself is read only by authorized persons. Access to information that is considered sensitive is limited by encoding the information such that only an authorized person can decode the information. A system for encoding and decoding information is referred to as a cryptographic system (or cryptosystem).
A cryptographic system is a system for sending a message from a sender to a receiver over a medium so that the message is “secure”, that is, so that only the intended receiver can recover the message. A cryptographic system (or cryptosystem) converts a message, referred to as “plaintext” into an encrypted format, known as “ciphertext.” The encryption is accomplished by manipulating or transforming the message using a “cipher key” or keys. The receiver “decrypts” the message, that is, converts it from ciphertext to plaintext, by reversing the manipulation or transformation process using the cipher key or keys. So long as only the sender and receiver have knowledge of the cipher key, such an encrypted transmission is secure.
A “classical” cryptosystem is a cryptosystem in which the enciphering information can be used to determine the deciphering information. To provide security, a classical cryptosystem requires that the enciphering key be kept secret and provided to users of the system over secure channels. Secure channels, such as secret couriers, secure telephone transmission lines, or the like, are often impractical and expensive.
A system that eliminates the difficulties of exchanging a secure enciphering key is known as “public key encryption.” By definition, a public key cryptosystem has the property that someone who knows only how to encipher a message cannot use the enciphering key to find the deciphering key without a prohibitively lengthy computation. An enciphering function is chosen so that once an enciphering key is known, the enciphering function is relatively easy to compute. However, the inverse of the encrypting transformation function is difficult, or computationally infeasible, to compute. Such a function is referred to as a “one way function” or as a “trap door function.” In a public key cryptosystem, certain information relating to the keys is public. This information can be, and often is, published or transmitted in a non-secure manner. Also, certain information relating to the keys is private. This information may be distributed over a secure channel to protect its privacy (or may be created by a local user to ensure privacy).
One example of an encryption/decryption scheme is the Data Encryption Algorithm (DEA) defined in ANSI X3.92 and also referred to as the Data Encryption Standard (DES). The DEA uses arithmetic and logical operations on binary representations of the key and the information to perform the transformation. In a binary numbering system, numbers are represented as a series of binary digits, or bits. A bit can have a value of either zero or one. Thus, a key and the information to be transformed are represented as a series of zeroes and ones.
The DEA performs multiple iterations, or rounds, on a block of bits during the transformation. A block of the information, or data, 64 bits in length is operated on at one time. It is split in half and a permutation is performed on the right half to expand its 32-bits into 48 bits. A 48-bit representation of the key is selected for use in the transformation. The following are examples of the resulting key and data 48-bit portions:
1 2 3 4 5 6 7 8 9. . .46 47 48key481 0 1 0 1 0 0 0 1 1 0. . .0 0 1data480 0 1 1 0 0 1 0 0 0 1. . .1 0 1
The key and data portions are combined using an “exclusive-or” (XOR) logical operation. An XOR operation yields the value of one if and only if one of its operands is equal to one. For example, if the first bits in the key and data are XOR'd the result would be one. If the forty-eighth bits are XOR'd, the result would be zero. The XOR operation yields a 48-bit result each bit being the result of an XOR operation between two bits from the key and the data. A series of substitutions are performed on the XOR result which produce thirty-two new bits and a permutation is performed on the new bits. The result is XOR'd with the left half of the 64-bit block. The left and right halves are switched and another iteration, or round, begins. A more detailed explanation of the DEA is provided in Applied Cryptography: Protocols, Algorithms, and Source Code in C, Schneier, B., John Wiler & Sons, Inc. (1996) and is incorporated herein by reference.
The authentication mechanism currently available authenticates static information. A runtime object is not static. Similarly, the current encryption mechanisms are used to encrypt static information. A mechanism is needed for signing and/or sealing a “live” object such as one that exists in a runtime environment.